<html>
<head>
	<meta charset="utf-8">
	<!-- 标签页名称 -->
	<title>第八组实训作业</title>
	<!-- 引入 echarts.js -->
	<script src="/static/js/echarts.js"></script>
	<script src="/static/js/jquery-3.5.0.js"></script>
	<script src="/static/js/echarts-wordcloud.min.js"></script>
</head>
<style>
	* {
		margin: 0px;
		padding: 0px;
		background-color: #fefae9;
		text-align: center;
		font-family: "Microsoft YaHei UI", serif;
	}

	.middle {
		width: 100%;
		margin: 5px auto;
	}
	.div1 {
		height: 380px;
		width: 30%;
		margin-left: 2.5%;
		margin-top: 5px;
		float: left;
		/* 调试边框颜色，修改透明度即可 */
		border: 1px solid rgba(255, 0, 0, 0);
	}
</style>
<body>
{{cs7}}
<div class="div1" id="cs7">
			<script type="text/javascript">
// 基于准备好的dom，初始化echarts实例
        var chart7 = echarts.init(document.getElementById('cs7'));
        // 指定图表的配置项和数据
        var cs7 = {
					title: {
						text: '评论词频',
						left: 'center'
					},
					tooltip: {},
					series: [{
						name: '频率',
						type: 'bar', //类型为字符云
						shape: 'smooth', //平滑
						gridSize: 2, //网格尺寸
						size: ['80%', '80%'],
						sizeRange: [35, 100],
						textStyle: {
							normal: {
								fontFamily: 'sans-serif',
								color: function () {
									return 'rgb(' +
										[Math.round(Math.random() * 160),
											Math.round(Math.random() * 160),
											Math.round(Math.random() * 160)
										]
										.join(',') + ')';
								}
							},
							emphasis: {
								shadowBlur: 5, //阴影距离
								shadowColor: '#333' //阴影颜色
							}
						},
						data: {{cs7|safe}}
					}]
				};
        // 使用刚指定的配置项和数据显示图表
        chart7.setOption(cs7);
			</script>
		</div>
</body>